package com.gfhd.multithread.thread_comunication;

public class DrawThread extends Thread{
    private Account account;

    public DrawThread(Account account, String name) {
        super(name);
        this.account = account;
    }

    public DrawThread() {
    }

    @Override
    public void run() {
        while (true){
            account.drawMone(100000);
            try {
                Thread.sleep(3000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
